{% extends 'tj3/tj3.html' %}

{% block navigation %}
	<script type="text/javascript">
		$('document').ready(function(){
			$('#my_tabs').tabs();
		});
	</script>
{% endblock navigation %}

{% block content %}
<h1 class="ui-widget ui-widget-header">{{project.name}}
	<span class="float_right">Performance Monitors: 
	{{base.name|capfirst}} vs. {{actual.name|capfirst}}</span>
</h1>

<div id="my_tabs">
	<ul>
		<li><a href="#first">Task Status</a>
		<li><a href="#second">Earned Value Analysis</a>
		<li><a href="#third">Resource Load</a>	
	</ul>

	<div id="first">
		<b>Task status</b> are calculated using Critical Path Method (CPM). Based on the project definition which includes
		WBS, task dependencies and constraints, resource allocations and actual timesheets, the system will re-run the scheduler
		each time to update statuses for all tasks. A comparison between any scenario and the baseline would show 
		the difference between what was on your wish list (the Baseline) and what is the reality (the Actuals).
		
		<div class="mycontent">
			<ul>
			<li><a href="{% url task_status_compare project.id,base.id,actual.id,0,1,"duration"%}">
					Duration 
				</a>
			<li><a href="{% url task_status_compare project.id,base.id,actual.id,0,1,"effort"%}">
					Effort
				</a>
			<li><a href="{% url task_status_compare project.id,base.id,actual.id,0,1,"effortdone"%}">
					Effort Done
				</a>
			<li><a href="{% url task_status_compare project.id,base.id,actual.id,0,1,"effortleft"%}">
					Effort Left
				</a>
			<li><a href="{% url task_status_compare project.id,base.id,actual.id,0,1,"complete"%}">
					Completion
				</a>
			</ul>
		</div>
	</div>
	
	<div id="second">
	<b>Earned Value Analysis (EVA)</b> depends on setting up and tracking budgets for activities (leaf tasks).
	The catch of EVA is all or nothing &mdash; either all tasks will be eligible for EVA, or none. 
	So when a budget is created, all tasks will received a default budget of "1". Same applies for tracking the
	actual cost. Default value is "1", also. The default values will enable EVA to measure
	the performance of your porject.

	<div class="mycontent">
		<ul>
		<li><a href={% url budget_compare project.id,base.id,actual.id,0,1,1%}>
				EAC 1
			</a>: adjusted using "BAC-CV"
		<li><a href={% url budget_compare project.id,base.id,actual.id,0,1,2%}>
				EAC 2
			</a>: adjusted using "BAC/CPI"
		</ul>
	</div>
	</div>
	
	<div id="third">
	<b>Resoruce load</b> calculates expected resource working hours on each day throughout the project duration. Actual hours
	will be from the timesheets that resource has filed with the system. The daily data can be further rolled up to
	compute weekly, monthly or quarterly sums.
	
		<div class="mycontent">
		<h2 class="ui-state-highlight ui-corner-all">Resources</h2>
			<div>	
			<span class="ui-icon ui-icon-person" style="float: left; margin-right: .3em;"></span>
			<span class="ui-icon ui-icon-person" style="float: left; margin-right: .3em;"></span>
			All
			<a class="float_right" href="{% url resource_load project.id,0,base.id,actual.id,"daily"%}", title="Daily">
				| D &nbsp;
			</a>
			<a class="float_right" href="{% url resource_load project.id,0,base.id,actual.id,"weekly"%}" title="Weekly">
				| W &nbsp;
			</a>
			<a class="float_right" href="{% url resource_load project.id,0,base.id,actual.id,"monthly"%}" title="Monthly">
				| M &nbsp;
			</a>
			<a class="float_right" href="{% url resource_load project.id,0,base.id,actual.id,"quarterly"%}" title="Quarterly">
				Q &nbsp;
			</a>
			</div>
			<br />
						
			{% for r in resources %}
				<div>	
				<span class="ui-icon ui-icon-person" style="float: left; margin-right: .3em;"></span>
				{{r.first_name|capfirst}} {{r.last_name|capfirst}}
				<a class="float_right" href="{% url resource_load project.id,r.id,base.id,actual.id,"daily"%}", title="Daily">
					| D &nbsp;
				</a>
				<a class="float_right" href="{% url resource_load project.id,r.id,base.id,actual.id,"weekly"%}" title="Weekly">
					| W &nbsp;
				</a>
				<a class="float_right" href="{% url resource_load project.id,r.id,base.id,actual.id,"monthly"%}" title="Monthly">
					| M &nbsp;
				</a>
				<a class="float_right" href="{% url resource_load project.id,r.id,base.id,actual.id,"quarterly"%}" title="Quarterly">
					Q &nbsp;
				</a>
				</div>
			{% endfor %}

		</div>
	</div>
</div>
<br />

<div>
	<h1 class="ui-state-highlight">Go To</h1>
	<ul>
		<li><a href="{% url project_main_plan project.id %}">Project Planning</a>
		<li><a href="{% url project_main_actual project.id,actual.id %}">Execution Central</a>
	</ul>
</div>
{% endblock content %}
